{% extends '../public/basechild.html' %}

{% block title %} 机构权限分配 {% endblock title %}

{% block style %}
<link href="/static/admin/adminex/css/style.css" rel="stylesheet">
<link href="/static/admin/hui/static/h-ui/css/H-ui.css" rel="stylesheet">
<link href="/static/admin/hui/lib/Hui-iconfont/1.0.7/iconfont.css" rel="stylesheet">
{% endblock style %}

{% block content %}
<section class="row" style="padding: 10px;">
	<div class="col-sm-12" style="overflow: hidden;">
		<span class="btn btn-primary radius" style="float: right; margin: 10px 0;" onclick="refresh()"><i class="Hui-iconfont">&#xe68f;</i>&nbsp;刷新页面</span>
	</div>
	<div class="col-sm-12">
		<table class="table table-border table-bg table-striped table-hover">
			<theader>
				<tr>
					<th>ID</th>
					<th>等级</th>
					<th>等级描述</th>
					<th>操作日期</th>
					<th>操作</th>
				</tr>
			</theader>
			<tbody>
			{% for tr in list %}
				<tr>
					<td>{{ tr.id }}</td>
					<td>{{ tr.gradeid }}</td>
					<td>{{ tr.remarks }}</td>
					<td>{{ time(tr.edittime) }}</td>
					<td>
						<div class="btn-group">
							<span class="btn btn-warning radius size-MINI" onclick="setquan({{ tr.id }})"><i class="Hui-iconfont">&#xe63f;</i>&nbsp;权限</span>
							<span class="btn btn-secondary radius size-MINI" onclick="edit({{ tr.id }})"><i class="Hui-iconfont">&#xe6df;</i>&nbsp;描述</span>
						</div>
					</td>
				</tr>
			{% endfor %}
			</tbody>
		</table>
	</div>
</section>
{% endblock content %}

{% block script %}
<script src="/static/admin/js/jquery.min.js"></script>
<script src="/static/admin/hui/static/h-ui/js/H-ui.js"></script>
<script src="/static/admin/layer/layer.js"></script>
<script src="/static/admin/js/h.js"></script>
<script src="/static/admin/js/ajax.js"></script>
<script>
function refresh(){
	window.location.reload();
}

function setquan(id){
	H.ajaxiframe('/admin/fenpei/setquan?id='+id, 1000, 700, '设置当前权限');
}

function edit(id){
	H.ajaxiframe('/admin/fenpei/edit?id='+id, 500, 200, '编辑权限信息');
}

</script>
{% endblock script%}

